﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GraphAPI.Model;

namespace GraphAPI
{
    public enum DialogType
    {
        EditNodeCaption, 
        EditRelationCaption,
        EditRelationWeight

    }

	public partial class FormDialogEdit : Form
	{
		public FormDialogEdit(string caption, DialogType type)
		{
			InitializeComponent();
			captionBox.Text = caption;

            okButton.Text = "Переименовать";

            if (type == DialogType.EditNodeCaption)
                this.Text = "Метка связи";
            

            if (type == DialogType.EditRelationCaption)
                this.Text = "Метка вершины";
            

            if (type == DialogType.EditRelationWeight)
            {
                this.Text = "Вес связи";
                okButton.Text = "Изменить";
            }

		}

		public string Caption
		{
			get { return captionBox.Text; }
		}

        private void NodeCaptionForm_Load(object sender, EventArgs e)
        {

        }

        private void captionBox_TextChanged(object sender, EventArgs e)
        {

        }

        private void captionBox_MouseDown(object sender, MouseEventArgs e)
        {

        }

        private void captionBox_KeyDown(object sender, KeyEventArgs e)
        {
                
        }

        private void okButton_Click(object sender, EventArgs e)
        {
        
        }
	}
}
